#pragma once
#include "Level.hpp"
#include "Util.hpp"
#include"Headerfile.hpp"
namespace shw
{
    class message
    {
    public:
        using ptr=std::shared_ptr<message>;
        size_t _line;           // ⾏号
        time_t _ctime;          // 时间
        std::thread::id _tid;   // 线程ID
        std::string _name;      // ⽇志器名称
        std::string _file;      // ⽂件名
        std::string _payload;   // ⽇志消息
        shw::level::value _level; // ⽇志等级
    public:
        message(){}
        message(size_t line,
                std::string name,
                std::string file,
                std::string payload,
                level::value level)
                :_line(line)
                ,_ctime(shw::util::date::Now())
                ,_tid(std::this_thread::get_id())
                ,_name(name)
                ,_file(file)
                ,_payload(payload)
                ,_level(level)
                {}
    };
}